package com.seaengine.actor.node
{
	import com.seaengine.GameConfig;
	import com.seaengine.actor.NPCActor;
	import com.seaengine.actor.anibmp.AnimationBMPMgr;
	import com.seaengine.actor.anibmp.BaseBmpNodeInfo;
	import com.seaengine.util.SmartURL;
	
	import flash.display.Sprite;

	public class NodeWrapper extends Sprite
	{
		protected var m_actor:NPCActor;
		protected var m_baseNode:BaseNode;
		protected var m_type:int;
		
		public function NodeWrapper(_actor:NPCActor,_baseNode:BaseNode,_type:int)
		{
			this.mouseEnabled = false;
			m_actor = _actor;
			m_type=_type;
			m_baseNode = _baseNode;
		//	var _parsedURL:SmartURL = new SmartURL(GameConfig.m_ResConfig+"role/a.swf");
		//	var _fileName:String = _parsedURL.tofile();
		//	m_baseNode.bitmapData = ResSystem.getInstance().getAppDomainBitmapData(_fileName,"dj_001");
			addChild(m_baseNode);
			x = -200;
			y = -380;
			
		}
		
		public function updatePostion():void
		{
//			x = m_baseNode.m_NodeInfo.getOffsetX();
//			y = m_baseNode.m_NodeInfo.getOffsetY();
		}
		
		public function doActionByNode(_node:BaseBmpNodeInfo):void
		{
			trace("nodeWrapper.doActionByNode"  + m_actor.actorName)
			m_baseNode.stopAction();
			m_baseNode.setInfo(_node);
			m_baseNode.startAction();		
			updatePostion();
		}

		
	}
}